#include <iterator>
#include <algorithm>
#include <iostream>
#include <string>
#include <cstring>

using namespace std;
void cryptTable(unsigned long* crypt_table);
unsigned long hashString(const string&,unsigned long*,unsigned long);

template <typename Iterator>
Iterator partition_(Iterator first,Iterator last){
	Iterator begin = first;
	Iterator end = last;
	if (first >= last) return last; 
	typedef typename std::iterator_traits<Iterator>::value_type value_type;
	value_type val = *--last;
	while (true){
		while (*first < val)
			++first;
		while (*last > val)
			--last;
		if (!(first < last))
			return first;
			iter_swap(first,last);
			++first;
			--last;
	}
}


